import utime as time

class haas_iokit:
    def func_ledFlash(ledModule, ledTitle, speed, flashTimes):
        i = flashTimes
        ledModule.open(ledTitle)

        flashInter = 500
        if speed == 'fast':
            flashInter = 100
        while i > 0:
            ledModule.write(1)
            time.sleep_ms(flashInter)

            ledModule.write(0)
            time.sleep_ms(flashInter)

            i = i-1
        ledModule.close()
